POV-Ray : Newsgroups : povray.general : Problems with the sum() and prod(). (Bug in v3.5 ?) : Re: Problems with the sum() and prod(). (Bug in v3.5 ?) Server Time
5 Aug 2024 00:22:05 EDT (-0400)
  Re: Problems with the sum() and prod(). (Bug in v3.5 ?)  
From: Jaap Frank
Date: 10 Jan 2003 10:33:22
Message: <3e1ee7c2$1@news.povray.org>
"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
news:web.3e1e2ad581e209a5b417814a0@news.povray.org...
>
> If I have understood the documentation
> for the new sum() and prod() functions
> right, then POV-Ray v3.5 for Windows
> behaves very oddly in some cases.
>
> I have observed two different beahiours:
>
> 1)
> When I run some code with these
> functions, POV-Ray just "hangs" and
> does not finish parsing, even if the
> calculations are very short. In this
> state it does not react when I press
> the Stop button.
>
> When I try to close it down, then it
> says "POV-Ray is currently rendering -
> do you want to stop ?".
>
> If I answer Yes, then POV-Ray closes
> down as it should. If I answer No,
> then POV-Ray just continues to "hang".
>
> The Pause button is working OK.
>
> 2)
> When I run some other code with these
> functions, POV-Ray finishes but
> produces wrong results.
>
>
> Can anyone confirm this behaviour ?
>
> I have inserted my test code below.
>
> The relevant documentation is here:
> http://www.povray.org/documentation/view/140/
> (Section 6.1.6.1)
>
> My PC runs Win98SE and has a 166MHz MMX
> Pentium processor with 96MB of RAM.
>
>
> Tor Olav
>
> [...]

Hello Tor Olav,

I get identical results and have a 450MHz MMX
PIII with 1 GB RAM.

I've tried some different things and I think if a function gives
0 as answer, the sum_function uses 1 instead, for:

#declare Fn = function(x) { sum(i, 1, 2, pow(x, 2)) }

with x =0:        2 instead of 0,

 and sum(i,1,8,pow(x,2))     gives 8 as answer.

There may be wrong more things, but this is what I
discovered so far.

Jaap Frank


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.